@extends('layouts.tankuang')

@section('content')
    <form name="add_form" id="add_form" action="{{url('admin/units/add_baowei',$id)}}" method="post" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div>
            <h2 class="text-center mg_b36 mg_t25" style="font-weight: bold;">
                {{getValue($type,'unit_type','id','name')}}安全检查
            </h2>
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <table class="table-form table-border w mg-auto">
                <tr>
                    <td class="font-bd">检查人</td>
                    <td colspan="2">
                        {{getValue($re->user_id,'admin_users','id','name')}}
                    </td>
                </tr>

                <tr>
                    <td class="font-bd">检查时间</td>
                    <td colspan="2">
                        {{$re->created_at}}
                    </td>
                </tr>

                <tr>
                    <td class="font-bd">单位负责人</td>
                    <td colspan="2">
                        {{getValue($re->unit_id,'units','id','frdb_name')}}
                    </td>
                </tr>

                <tr>
                    <td class="font-bd">负责人电话</td>
                    <td colspan="2">
                        {{getValue($re->unit_id,'units','id','frdb_phone')}}
                    </td>
                </tr>

                @foreach($res as $k=>$v)
                    <tr>
                        <td class="font-bd" width="80%">{{$v->field_content}}</td>
                        <td width="20%">
                            {{$v->val}}
                        </td>
                    </tr>
                @endforeach

                <tr>
                    <td class="font-bd">备注</td>
                    <td colspan="2">
                        <textarea class="textarea" name="remark" disabled>{{$re->remark}}</textarea>
                    </td>
                </tr>

                <tr>
                    <td class="font-bd">是否合格</td>
                    <td>
                        @if($re->status == 1)合格
                        @elseif($re->status == 2)不合格
                        @endif
                    </td>
                </tr>
            </table>

            <div class="w wbt mg_t25 text-center">
                <button type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-no'" onclick="$('#w').window('close')">关闭</button>
            </div>
        </div>
    </form>

@stop